From 0ace9284f09182ed5c5d1f077f5924252dbcb07e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roger=20Pau=20Monn=C3=A9?= Date: Fri, 23 Feb 2018 11:00:31 +0100 Subject: [PATCH] x86: fix indirect thunk usage of CONFIG_INDIRECT_THUNK MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When indirect_thunk_asm.h is instantiated directly into assembly files CONFIG_INDIRECT_THUNK might not be defined, and thus using .if against it is wrong. Add a check to define CONFIG_INDIRECT_THUNK to 0 if not defined, so that using .if CONFIG_INDIRECT_THUNK is always correct. This suppresses the following clang error: :8:9: error: expected absolute expression .if CONFIG_INDIRECT_THUNK == 1 ^ :1:1: note: while in macro instantiation INDIRECT_BRANCH call %rdx ^ entry.S:589:9: note: while in macro instantiation INDIRECT_CALL %rdx ^ Note that this is a preparatory patch in order to enable clang's integrated assembler, the integrated assembler is not yet enabled for assembly files. Signed-off-by: Roger Pau Monné Acked-by: Jan Beulich --- xen/include/asm-x86/asm_defns.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/include/asm-x86/asm_defns.h b/xen/include/asm-x86/asm_defns.h index 6fc13d39d8..ebd2c88a1f 100644 --- a/xen/include/asm-x86/asm_defns.h +++ b/xen/include/asm-x86/asm_defns.h @@ -15,6 +15,9 @@ #include #ifdef __ASSEMBLY__ +#ifndef CONFIG_INDIRECT_THUNK +.equ CONFIG_INDIRECT_THUNK, 0 +#endif # include #else asm ( "\t.equ CONFIG_INDIRECT_THUNK, " -- 2.30.2